import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '标题',
    align: "center",
    dataIndex: 'adTitle'
  },
  {
    title: '图片/视频',
    align: "center",
    dataIndex: 'url',
    customRender: render.renderImage,
  },
  {
    title: '广告类型',
    align: "center",
    dataIndex: 'type_dictText'
  },
  {
    title: '广告状态',
    align: "center",
    dataIndex: 'status_dictText'
  },
  {
    title: '广告位置',
    align: "center",
    dataIndex: 'position_dictText'
  },
  {
    title: '排序',
    align: "center",
    sorter: true,
    dataIndex: 'sort'
  },
  {
    title: '外链',
    align: "center",
    dataIndex: 'link'
  },
  {
    title: '点击量',
    align: "center",
    dataIndex: 'click'
  },
  {
    title: '背景颜色',
    align: "center",
    dataIndex: 'bgColor'
  },
  {
    title: '描述',
    align: "center",
    dataIndex: 'description'
  },
  {
    title: '创建日期',
    align: "center",
    dataIndex: 'createTime'
  },
];

// 高级查询数据
export const superQuerySchema = {
  adTitle: {title: '标题',order: 0,view: 'text', type: 'string',},
  url: {title: '图片/视频',order: 1,view: 'image', type: 'string',},
  type: {title: '广告类型',order: 2,view: 'number', type: 'number',dictCode: 'ad_type',},
  status: {title: '广告状态',order: 3,view: 'number', type: 'number',dictCode: 'ad_status',},
  position: {title: '广告位置',order: 4,view: 'number', type: 'number',dictCode: 'ad_position',},
  sort: {title: '排序',order: 5,view: 'number', type: 'number',},
  link: {title: '外链',order: 6,view: 'text', type: 'string',},
  click: {title: '点击量',order: 7,view: 'text', type: 'string',},
  bgColor: {title: '背景颜色',order: 8,view: 'text', type: 'string',},
  description: {title: '描述',order: 9,view: 'text', type: 'string',},
  createTime: {title: '创建日期',order: 10,view: 'datetime', type: 'string',},
};
